#include "CppProject.h"
#include "Modules/ModuleManager.h"
#if WITH_EDITOR
#include "ISettingsModule.h"
#include "StatusSetting.h"

#define LOCTEXT_NAMESPACE "FCppProjectModule"
void FCppProjectModule::StartupModule()
{
	//RegisterSettings
	if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
	{
		SettingsModule->RegisterSettings(
			"Project",	//ContainerName
			"Plugins",	//CategoryName
			"MonitorTool",	//SectionName
			LOCTEXT("ModuleConfig", "ModuleConfig"),						//DisplayName
			LOCTEXT("ModuleConfigDescription", "ModuleConfigDescription"),	//Description
			GetMutableDefault<UStatusSettingConfig>());	//SettingsObject
	}
}

void FCppProjectModule::ShutdownModule()
{
	if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings"))
	{
		SettingsModule->UnregisterSettings("Project", "Plugins", "MonitorTool");
	}
}
#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FCppProjectModule, CppProject)
#else
IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, CppProject, "CppProject");
#endif



